package server.comunicacion;

//import cliente.comunicacion.*;
import server.excepciones.CitaNoValidaException;
import server.excepciones.VolanteNoValidoException;
import cliente.comunicacion.ICliente;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.sql.SQLException;
import java.util.Date;
import java.util.Vector;
import server.dominio.Beneficiario;
import server.dominio.Cita;
import server.dominio.ISesion;
import server.dominio.Medico;
import server.excepciones.BeneficiarioInexistenteException;
import server.excepciones.BeneficiarioNoExistenteException;
import server.excepciones.BeneficiarioYaExistenteException;
import server.excepciones.FechaNoValidaException;
import server.excepciones.MedicoInexistenteException;
import server.excepciones.MedicoNoExistenteException;
import server.excepciones.MedicoYaExistenteException;
import server.excepciones.UsuarioIncorrectoException;






public interface IServidorA extends Remote {
        
        public ISesion identificar(String login, String password) throws RemoteException, UsuarioIncorrectoException, SQLException, Exception;
	public Beneficiario getBeneficiario(long idSesion, String dni) throws RemoteException, BeneficiarioInexistenteException, SQLException,Exception;
        public Beneficiario getBeneficiarioPorNSS(long idSesion, String nss) throws RemoteException, BeneficiarioInexistenteException, SQLException,Exception;
	public Medico getMedico(long idSesion, String dni) throws RemoteException, MedicoInexistenteException, SQLException, Exception;

        //public void regist(long idSesion);
	public void crear (long idSesion, Beneficiario beneficiario) throws RemoteException, BeneficiarioYaExistenteException, SQLException, Exception;
	public void modificar(long idSesion, Beneficiario beneficiario) throws RemoteException, BeneficiarioNoExistenteException, SQLException, Exception;
        public void eliminar(long idSesion, Beneficiario beneficiario) throws RemoteException, BeneficiarioNoExistenteException, SQLException, Exception;

        public void crear(long idSesion, Medico medico) throws RemoteException, MedicoYaExistenteException, SQLException, Exception;
	public void modificar(long idSesion, Medico medico) throws RemoteException, MedicoNoExistenteException, SQLException, Exception;
        public void eliminar(long idSesion, Medico medico) throws RemoteException, MedicoNoExistenteException, SQLException, Exception;

        public void registrar(long idSesion, ICliente cliente) throws RemoteException, Exception;
        public void liberar(long idSesion) throws RemoteException, Exception;
        public void mensajeAuxiliar(long idSesion, long codigoDeMensaje, Object informacion)  throws RemoteException, Exception;

         public void modificarCalendario(long idSesion, Medico medico, Vector<Date> dias, Date horaDesde, Date horaHasta, Medico sustituto) throws RemoteException, Exception;
         public Cita pedirCita(long idSesion, Beneficiario beneficiario, String idMedico, Date fechayHora, long duracion) throws RemoteException, BeneficiarioInexistenteException, MedicoInexistenteException, FechaNoValidaException, SQLException, Exception;
         public Cita pedirCita(long idSesion, Beneficiario beneficiario, long idVolante, Date fechayHora, long duracion) throws RemoteException, BeneficiarioInexistenteException, MedicoInexistenteException, FechaNoValidaException, VolanteNoValidoException, SQLException, Exception;
         public Vector<Cita> getCitas(long idSesion, String dni) throws RemoteException, BeneficiarioInexistenteException, SQLException, Exception;
         public void anularCita(long idSesion, Cita cita) throws RemoteException, CitaNoValidaException, SQLException, Exception;

}
